import { post, init, get } from 'tine-node-request'

init({
    headers: {
        'Content-Type': 'application/json',
        'X-Bkapi-Authorization': JSON.stringify({
            access_token: 'v9RrNO6CAJqpVo95gLKLorjK0RgguU'
        })
    }
})
export const getToken = async function () {
    const res = await post('http://openapi.zhiyan.woa.com/infra/v1/token/projectsget')
    console.log(res)
}

export const getAjax = async function () {
    const res = await get(
        'https://devops.apigw.o.woa.com/prod/v4/apigw-user/projects/zhiyan-linceyliu-test/templates/template_detail?templateId=d3b9739bc43144849ebbf96c40e0bf54'
    )
    console.log(res)
}

console.log(getAjax())
